package com.guchenbo.erp.inventory.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.guchenbo.erp.dao.entity.ErpBaseModel;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品分类表
 * </p>
 *
 * @author guchenbo
 * @since 2025-07-12
 */
@TableName("product_category")
public class ProductCategory extends ErpBaseModel {

    /**
     * 分类ID
     */
    @TableId(value = "category_id", type = IdType.AUTO)
    private Long categoryId;

    /**
     * 分类编码
     */
    private String categoryCode;

    /**
     * 分类名称
     */
    private String categoryName;

    /**
     * 父级分类ID，0表示顶级分类
     */
    private Long parentId;

    /**
     * 分类层级：1=一级分类，2=二级分类...
     */
    private Byte level;

    /**
     * 状态：1=启用，0=禁用
     */
    private Byte status;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryCode() {
        return categoryCode;
    }

    public void setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Byte getLevel() {
        return level;
    }

    public void setLevel(Byte level) {
        this.level = level;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "ProductCategory{" +
            "categoryId = " + categoryId +
            ", categoryCode = " + categoryCode +
            ", categoryName = " + categoryName +
            ", parentId = " + parentId +
            ", level = " + level +
            ", status = " + status +
            ", updateTime = " + updateTime +
        "}";
    }
}
